import type { App } from "vue"


export const globalRegisterDirectives = async (app: App) => {
    const directives: any = import.meta.glob('./**/*.ts')

    for (const path in directives) {
        const module = await directives[path]()
        const directiveName = path.match(/\/(.+)\.ts/)![1]
        app.directive(directiveName, module.default)
    }
}